home *** CD-ROM | disk | FTP | other *** search
/ Hacker's Secrets 4 / Hacker's Secrets 4.iso / privacy / ppfaq104.txt < prev    next >
Text File  |  1996-09-20  |  36KB  |  631 lines

  1.  
  2.                     =====================================
  3.                          Passphrase FAQ Version 1.04
  4.                          Last update: 16 June, 1995
  5.                     Copyright 1995-96 Randall T. Williams
  6.                     =====================================
  7.  
  8. *****************************************************************************
  9.  
  10. Contents
  11. ========
  12. 1.0 Introduction
  13.         1.0.1 Where do I find the Passphrase FAQ?
  14.     1.1 How things are used in this document
  15.     1.2 How do I get random numbers?
  16.         1.2.1 Psuedo-random number generators
  17.         1.2.2 Hardware random number generators
  18.     1.3 How hard is it to crack the IDEA key?
  19.     1.4 How hard is it to crack RSA?
  20.     1.5 What is MD5?
  21. 2.0 How long should the passphrase be?
  22.         2.0.1 What if I use another language?
  23.     2.1 What if I use common phrases or quotes?
  24.     2.2 What happens if I combine phrases and nonsense phrases?
  25.     2.3 Does odd spelling, punctuation and capitalization help?
  26.     2.4 What if I use random words?
  27.         2.4.1 Can I use a key generator dictionary?
  28.     2.5 What if I use all random letters?
  29.     2.6 What if I use all random characters?
  30.     2.7 How long does it take to attack a passphrase?
  31.         2.7.1 Something anyone can do
  32. 3.0 How do I make a strong passphrase?
  33. 4.0 How strong is my passphrase?
  34.     4.1 Passphrase examples
  35. 5.0 Who might try to get my passphrase and how?
  36.     5.1 Law enforcement and the government
  37.     5.2 Multitasking systems
  38.     5.3 Multi-user systems
  39.     5.4 Tempest and electronic surveillance
  40. 6.0 How do I securely store my passphrase?
  41.     6.1  Should I write my passphrase down?
  42. 7.0 The really big numbers
  43.     7.1 glossary
  44. 8.0 Copyrights and such
  45. 9.0 References
  46.  
  47. *****************************************************************************
  48.  
  49.  
  50.  
  51. 1.0 Introduction
  52. ================
  53.     This is The Passphrase FAQ for PGP. I tried to include everything
  54. I've seen asked on alt.security.pgp along with some extras to cover other
  55. things like passwords and different key lengths. Most people who have had
  56. college algebra or higher should be able to follow the math. Check the
  57. glossary in section 7.1 to help with some of the terms and how they are
  58. used.
  59.     MD5 and IDEA are based on 128 bit blocks. It should be trivial to change
  60. to a 56 bit DES key or keys of other sizes. Passwords are different than
  61. passphrases due to length. The same ideas will work for analyzing your
  62. password or passphrase.
  63.     This FAQ is under construction (aren't they all?). Changes will be made
  64. as I learn about them, generate them or have time. Applied Cryptography [1]
  65. leads me to believe that there hasn't been much published research in this
  66. area. Password cracking is covered, but little is said about passphrases.
  67. Some of the math involved is not normally a part of what I do. I'm an
  68. electronics engineer by training. Cryptography is just a hobby. Forgive
  69. anything that may seem trivial that was overlooked. I created most of this
  70. from my head. Comments, corrections, additions, encouragement and positive
  71. criticism can be emailed to ac387@yfn.ysu.edu, but don't expect much of a
  72. reply. Flames should be sent to /dev/null.
  73.  
  74. 1.0.1 Where do I find the Passphrase FAQ?
  75. =======================================
  76.     This is a catch 22. Since you are reading this, you found it. If you
  77. can't find it, this section probably won't help. So far there is only
  78. three official places you can find the Passphrase FAQ. Thanks go to
  79. Galactus, Don Henson and Patrick Finerty for the web sites. A PGP signed
  80. copy of the FAQ also gets posted to alt.security.pgp about the middle of
  81. every month (most of the time).
  82.  
  83. They are:
  84.     http://www.stack.urc.tue.nl/~galactus/remailers/passphrase-faq.html
  85.     http://colossus.net/wepinsto/wsft_f/wspp_f/passfraz.html
  86.     http://zifi.genetics.utah.edu/crypto/crypto.html
  87.  
  88. 1.1 How things are used in this document
  89. =========================================
  90.     The first thing is about the numbers used in this document. Most math
  91. here was performed on a Texas Instruments TI-60 pocket calculator and a
  92. couple programs on my PC for verification. The number of significant digits
  93. is limited to just a few places because a string of almost 40 digits isn't
  94. needed and they are really beyond the comprehension of many. Look at section
  95. 6.0 for the exact value of some of the big numbers used here. I use the
  96. notation where 3.4E38 = 3.4 * 10^38 = 2^128. This was easier to type and
  97. it saves a little space. Also note that log(x) (base 10) is being used here.
  98. Since we are just using the exponents, don't worry about using ln(x)
  99. (base 2.718 or e) if you don't have log(x).
  100.     Rounding where it effects security are rounded up to the next highest
  101. whole number to be safe. Other numbers are just rounded to the nearest
  102. decimal place. The text should be clear on this in most cases.
  103.     References are numbered and enclosed in []. Sub references have a lower
  104. case letter added. So with that out of the way, on to other things.
  105.  
  106. 1.2 How do I get random numbers?
  107. ================================
  108.     Random numbers are very hard to generate. Quite often non-random events
  109. effect the randomness of devices or circuits. A suggestion would be to make
  110. 1 to N markers and place them in a very good mixer. You might want to try
  111. coin flipping, but if you have a person involved, a coin flip can be biased
  112. enough to skew the results over the long term. A ball method like several
  113. lotteries use is a good random source, but don't use the numbers from the
  114. lottery. Lottery numbers are a little to obvious and it is easy to try them.
  115. A pool/billiards game uses a set of balls in a bottle that allows only one
  116. ball to be extracted at a time. This is a cheap and inexpensive source for
  117. random numbers. I leave it to the reader to figure out how to get the 16
  118. balls translated to something useful for any particular application. Those
  119. who are familiar with Dungeons and Dragons and the other role playing games
  120. may already have a set of dice numbered in a variety of sizes. The one
  121. caution with dice is that adding dice (Eg. 2 six sided dice) will change the
  122. output to a median number (odds of 7 are 1 in 6) and the extremes (odds of
  123. 2 and 12 are 1 in 36) are less likely to occur, losing some randomness.
  124. Be sure that you have random dice. The quality is sometimes not very good
  125. and may cause non-random results. You might want to look at RFC1750 [6]
  126. for more information on generating random numbers for secure purposes.
  127.  
  128. 1.2.1 Psuedo-random number generators
  129. =====================================
  130.     Using a PRNG is in most cases a bad way to generate random numbers.
  131. The problem with PRNGs is the numbers are generated by a function.
  132. This includes the BASIC RND() function, the C rand() function or any
  133. other language that has a random function. Programmers have used this
  134. simple and relatively fast method in programs and games for years.
  135. The reason for this is because of the way PRNGs work. A simple PRNG
  136. will use code something like R = (A * R1 + B) mod(C): R1 = R: R = R / C.
  137. Primes are usually used for constants A, B, and C. Most languages have
  138. provisions for placing a seed value in R1 before calling the PRNG but it
  139. isn't needed and some PRNGs may not bother with the additive constant B.
  140. What makes a PRNG easy to break is that many only use 16 bits to store the
  141. values. That means we can brute force a 16 bit PRNG key space in 65536 * N
  142. attempts where N is the number of psuedo-random elements used. Almost anyone
  143. can probably search a standard PRNG key space in a day. A worst case search
  144. will probably last less than a week even on the average home computer.
  145.     If you are lucky and have a good PRNG, then the search space may be
  146. 2^32 which isn't a whole lot better. Note that 40 bit keys can be brute
  147. forced by an individual with access to enough computing power in about a
  148. week or less and places like the NSA don't mind 40 bit keys. Look at [1e]
  149. for more information and other references on random sequence generators.
  150.  
  151. 1.2.2 Hardware random number generators
  152. =======================================
  153.     Hardware generators can be made using the noise from a variety of
  154. semiconductor PN junctions. A good example of this is simply amplified
  155. noise from a zener diode. Other noise sources are high value resistors and
  156. a number of commercial chips that use a variety techniques to make noise.
  157. A caution with hardware sources of random information is that they could
  158. be influenced by noise or other signals that are not random. Most places
  159. are saturated with 50 or 60 Hz noise from power, clock signals and other
  160. digital noise from computers, television and radio, and a variety of other
  161. types of electronic equipment. For safety, you may want to encrypt or hash
  162. the output of a hardware source. A good hash function or encryption will
  163. hide any undiscovered patterns. An inexpensive random bit source can be
  164. built for $10.00 (U.S.) [7] and mass produced for under $5.00 (U.S.).
  165.  
  166. 1.3 How hard is it to crack the IDEA key?
  167. =========================================
  168.     PGP uses IDEA as the conventional cipher. The key for IDEA is 128 bits.
  169. We can calculate the brute force key space with 2^128 = 3.4E38. A special
  170. hardware based key cracker for IDEA that can try one billion (1E9) keys
  171. per second will take 1.08E22 years to go through all possible keys.
  172. You can expect to get most keys in about half that time which will take
  173. 5.39E21 years. It is estimated that the sun will go nova in 1E9 years.
  174. Since the algorithm is secure, the cryptanalyst has to go after other things
  175. like RSA or your passphrase. It is currently beyond our technology to crack
  176. an IDEA key by brute force.
  177.  
  178. 1.4 How hard is it to crack RSA?
  179. ================================
  180.     Factoring is an easier problem than brute force search of the key space.
  181. The only current practical factoring methods for RSA size numbers are the
  182. Multiple Polynomial Quadratic Sieve (MPQS) and it's variations, and the
  183. Number Field Sieve (NFS). Estimates for the MPQS run around 3.7E9 years
  184. for a 200 digit/664 bit number [1d]. I should include that no one knows
  185. how long it will take to factor numbers larger than about 130 digits/429 bits
  186. except for some special cases. Some net references on numbers that have been
  187. factored are RSA129 and The 384 Bit Blacknet Key. You should note that it
  188. took a lot less time and computing power to factor a 116 digit/384 bit key
  189. than it took to factor a 129 digit/426 bit key. The NFS factored RSA130 a
  190. 130 digit/430 bit key even faster than RSA129 was factored. RSA is probably
  191. the weakest link in PGP, but currently no one knows a good way to factor
  192. numbers over 155 digits/512 bits without building special hardware.
  193.  
  194. 1.5 What is MD5?
  195. ================
  196.     MD5 is what takes your passphrase and scrambles it into an IDEA key.
  197. In theory, MD5 should generate a different output for every possible
  198. bit combination as long as your key space is equal to or larger than 2^128.
  199. Proving that MD5 will generate all 2^128 outputs from a given key space
  200. equal to 2^128 is practically impossible. This would be about the same as a
  201. brute force search on the IDEA key. An interesting problem is that
  202. theoretically you can produce an equivalent passphrase by searching any given
  203. key space that is 2^128 or larger.
  204.     In light of the recent attack on MD5, wait and watch. While a weakness
  205. has been found, the jury is still out on using unmodified MD5. A move to
  206. SHA or other hash function may be in the future for PGP.
  207.  
  208. 2.0 How long should the passphrase be?
  209. ======================================
  210.     The rule of thumb is that you use one character per bit of key needed.
  211. You really get about 1.2 bits per English text character [1c] for key usage.
  212. Modifying the key size means 128 / 1.2 = 106.667 or 107 letters of text are
  213. needed. This assumes normal English structure, only lower case letters and
  214. spaces for the passphrase and for the calculation purposes, all spaces are
  215. ignored in the passphrase [1a]. Few of us are willing to type out a line and
  216. a half of text every time we use PGP though. This is where security fails
  217. and we use weak passphrases.
  218.  
  219. 2.0.1 What if I use another language?
  220. =====================================
  221.     Using your native language is probably an obvious choice. Throughout
  222. this FAQ, data and statistics apply to English text. Using another language
  223. or combining languages will change the numbers some. It will not make your
  224. passphrase harder to guess. Attacking a different language or even multiple
  225. languages is still the same. The search space is roughly the size of the
  226. language or grows by adding the size of the average size of the vocabulary
  227. of the added language. Dictionary attacks in another language would run in
  228. the same manner as a dictionary attack in English.
  229.  
  230. 2.1 What if I use common phrases or quotes?
  231. ===========================================
  232.     The short version on common phrases is don't use them ever.  A book of
  233. quotes may contain 40,000 quotes [5]. You could probably set an old PC XT
  234. in a corner and have common phrases checked in a relatively short amount
  235. of time without any special hardware. Simple phrases will be the first
  236. ones checked. If you are a Star Trek fan, "Beam me up Scottie" is a bad
  237. phrase to use. If you can find the phrase in any published work then don't
  238. use it. A simple background search will reveal what kind of music, books,
  239. TV shows, movies, games, hobbies, and everything else you might use. All
  240. the common phrases will be tried on the first pass of a key search. You can
  241. try 40,000 quotes using unmodified PGP in about 2.4 days. See section 2.7.1
  242.  
  243. 2.2 What happens if I combine phrases and nonsense phrases?
  244. ===========================================================
  245.     Combining phrases extends the phrase search some. Nonsense phrases will
  246. also slow down a brute force search [4]. A smart attack would take advantage
  247. of normal phrase structure. Ordering nouns, verbs, adverbs, adjectives
  248. and all the other components of a sentence would be tried in a natural
  249. order. A good nonsense phrase begins to appear to be random as far as a
  250. brute force search goes, but it isn't really random.
  251.  
  252. 2.3 Does Odd spelling, punctuation and capitalization help?
  253. ===========================================================
  254.     Using "0dd sp3LLing5 and CaPitaliZaTiOn" will extend the search by about
  255. 1 million tries [1b] per word. Modifying the numbers for passphrases means
  256. you probably get more than 8 million (1 million per word) for a decent
  257. passphrase. Capitalization at random will cause word length dependent
  258. permutations. Adding a single digit 0-9 to a word multiplies the dictionary
  259. size by 10. This is a small gain but in some cases may be worth the trouble.
  260. Substituting 3 for E, 1 for I, 5 for S and 2 for Z adds the numbers to the
  261. possible alphabet. Adding the numbers 0-9 increases the alphabet to 36
  262. characters. Switching letters, letter rotations, letter shifts, and other
  263. word scrambling won't help the randomness but they do slow the brute force
  264. search some. You can approach a random looking passphrase in this
  265. manner.
  266.  
  267. 2.4 What if I use random words?
  268. ===============================
  269.     A dictionary [3] has around 74,000 words in it. Using the 128 bit key
  270. size we then need, log(2^128) / log(74,000) = 7.91, random words from
  271. our dictionary. Rounding up, you will then need 8 random words to make
  272. the passphrase harder than the IDEA key. A brute force dictionary attack
  273. will then take slightly longer than a brute force attack on the IDEA key.
  274. This is a decent way to generate a passphrase except that it is kind of
  275. hard to remember sometimes. This is pretty easy to type though.
  276.  
  277. 2.4.1 Can I use a key generator dictionary?
  278. ===========================================
  279.     A smaller dictionary can be searched much faster. Just having one around
  280. is enough of a clue to start with that instead of the normal searches.
  281. So, you better be sure your key generation system is really random. Programs
  282. can be compromised, written poorly or simply monitored. Try Diceware [8] for
  283. a good random passphrase generation system. It is irrelevant if the
  284. dictionary has any tricks that make the construction of the words more
  285. random. In the end, the search space is all that counts. The random number
  286. source may not be random and further reduce the search. For these reasons,
  287. you need to be sure your key generator is really random.
  288.     Here is what effect different size dictionaries have. Using a 10,000
  289. word dictionary, (from section 2.7) log(3.16E13) / log(10,000) = 3.37 or
  290. about 4 words are needed to last more than the average 6 months. Using the
  291. same dictionary to  create an IDEA equivalent passphrase gives us
  292. log(2^128) / log(10,000) = 9.63 or 10 words are needed. Using a 25,000 word
  293. dictionary means log(2^128) / log(25,000) = 8.76 or 9 words. A 50,000 word
  294. dictionary needs log(2^128) / log(50,000) = 8.20 or 9 words.
  295.  
  296. 2.5 What if I use all random letters?
  297. =====================================
  298.     The standard alphabet has 26 letters in it. Doing the math again we get
  299. log(2^128) / log(26) = 27.23 random letters are needed. Rounding up will mean u
  300. sing 28 letters to make it harder than the IDEA key. Memorizing
  301. the 28 random letters would be tough to do, but it isn't impossible. This
  302. isn't to bad to type though.
  303.  
  304. 2.6 What if I use all random characters?
  305. ========================================
  306.     If we use all possible printable ASCII characters we end up with 95
  307. possible characters to work with. Punching buttons we end up needing
  308. log(2^128) / log(95) = 19.48 random characters for this method.
  309. Rounding up again, 20 random characters are needed to make this method
  310. harder than the IDEA key. Memorizing 20 random characters is still a tough
  311. job, and it is kind of hard to type.
  312.  
  313. 2.7 How long does it take to attack a passphrase?
  314. =================================================
  315.     We can assume that a 1 million key per second key cracker is possible.
  316. A Pentium executes about 1 instruction per clock cycle with pipelining [3].
  317. Using a 200Mhz Pentium and minimal instructions shows us that a small
  318. program will run 1 million times per second. The Cyrix 6x86 is faster for
  319. an identical clock speed and RISC chips are even faster. This means that
  320. without stretching current technology much, we can program a desk top
  321. computer and try 1E6 * 60 * 60 * 24 * 365.25 = 3.15576E13 keys per year.
  322. A key of random words must be log(3.16E13) / log(74,000) = 2.77 or 3 words
  323. to last longer than an average of 6 months. The random 3 word key has all
  324. keys searched in about 1 year. In the end, what we are really trying to do
  325. is stop a dumb computer attack. The smarter the computer gets, the slower
  326. the computer gets. We can always build custom hardware and just use the
  327. computer as a monitor or controller.
  328.  
  329. 2.7.1 Something anyone can do
  330. =============================
  331.     In an experiment on a 486DX2-66 w/128k cache, a RAM drive was set up,
  332. Smartdrv, an *unmodified* copy of MIT PGP262, and all other files needed
  333. were loaded. RAM shadows were enabled, video and BIOS cacheable and any
  334. other setting that made it all run faster. A program was written in QBASIC
  335. (it comes with DOS 5 and 6.x) to try a passphrase using the passphrase
  336. environment variable to send new passphrases to PGP and check exit error
  337. codes. PGP was executed with +batchmode.
  338.     Using this method, It is possible to try almost two passphrases every
  339. second (1.8125 actually). PGP has beeps and delays when errors are detected,
  340. but were minimized by some of the settings used. In order to seriously
  341. attack a passphrase, you would need to modify PGP to eliminate the delays
  342. and speed it up.
  343.     The moral is anyone can get a single random word from a small dictionary
  344. in about an hour. Most larger dictionaries can be searched in less than a
  345. day. Just about anyone has all the tools needed for this attack. The program
  346. and the settings needed to do the work are simple enough for any decent high
  347. school hacker.
  348.  
  349. 3.0 How do I make a strong passphrase?
  350. ======================================
  351.     The answer depends on how secure your passphrase needs to be. Start with
  352. a normal phrase and then with a bit of random help, distort it. Make a
  353. nonsense phrase by changing words. Remember to switch the sentence
  354. structure around in a random fashion. Add a few random words or characters
  355. to enhance the security. The goal is to create something you can
  356. remember and last as long as a brute force attack on the IDEA key.
  357.     The phrase, "my unbreakable super pass phrase can't be beat", is weak
  358. by itself. So what if we change it some? "mile unbraking stupor past froze
  359. can tent bee beets" is all well and good except that in an attack,
  360. a homophone dictionary may be used. On the other hand, in one pass we have
  361. a nonsense phrase that has a different structure and words that don't
  362. quite logically connect. Add several random characters to make it impossible
  363. to guess by any means other than brute force and you are done. The phrase
  364. is fairly easy to remember because you used a normal phrase to construct it.
  365. If you forget the actual phrase you will probably be able to reconstruct it.
  366. Being human, we tend to do things the same in a predictable manner.
  367.     For more security, you can generate fully random phrases or character
  368. sequences. This will take time and may be difficult to remember. Your
  369. level of security is easy to control by limiting the key length. One nearly
  370. foolproof method is Diceware [8].
  371.  
  372. 4.0 How strong is my passphrase?
  373. ===================================
  374.     Now using what we know of absolute minimums and maximums of a
  375. passphrase, we can make up a little formula to calculate how secure any
  376. given passphrase is. For purposes here, random means really random.
  377. Psuedo-random methods like rnd() and linear congruential generators
  378. don't count here. The constants are based on the needs of PGP. You may
  379. need to change them for your use.
  380.  
  381.         PS = passphrase security
  382.         FF = fudge factor
  383.             this is an attempt to include variables like nonsense phrases,
  384.             odd spelling, punctuation, capitalization and numbers.
  385.         RW = random words (Don't count as a nonsense phrase)
  386.         RC = random characters
  387.         RL = random letters
  388.         OC = odd characters (other than lower case letters)
  389.         LC = total character count
  390.             (letters in whole words, spaces ignored)
  391.             (don't count if a totally random system is used.)
  392.  
  393.             Note: fudge factors may change when more work is done.
  394.         F1 = 0.5 = nonsensical phrases hooked together
  395.         F2 =  ?  = odd spelling/misspelling, punctuation and capitalization
  396.             This is a permutation dependent on the number of characters
  397.             changed and the length of the words used.
  398.             To simplify use F2 = 4 * OC / LC
  399.         F3 = .09 = random numbers (exclude if F2 is used)
  400.  
  401.     FF = 1 + F1 + F2 + F3
  402.  
  403.     PS = RW/8 + RC/20 + RL/28 + LC/107 * FF
  404.  
  405.     Calculating the passphrase security (PS) should be a simple matter for
  406. most people. A PS > 1 means it will be easier to attack the IDEA key before
  407. your passphrase will crack. A PS < 1 means that it is probably easier to
  408. attack your passphrase instead of the IDEA key. If you have a PS under 1,
  409. you may still have a secure passphrase. An estimate is that PS values less
  410. than .35 can be broken in less than a year. The formula is under construction
  411. and is only a guide number. There is hope that any errors are on the
  412. conservative side and it is probably possible to fool the formula.
  413.  
  414. 4.1 Passphrase examples
  415. =======================
  416.     These are examples of passphrases and the PS numbers associated with
  417. them. If you can work through these and get the same numbers, then you are
  418. well on your way to understanding how to make passphrases good or bad.
  419.  
  420. .855   Nonsense phrase
  421. betty was smoking tires in her peace of pipe organs and playing tuna fish.
  422. 1.05   A random bunch of characters.
  423. A6:o@6 Ls+\` uGX%3y[k
  424. 1.34   Odd capitalization/punctuation and nonsense.
  425. Web oF thE Trust is BrokEn cAn You Glue it Back ToGether? and give it xRays.
  426. .280   An average phrase
  427. There is a sucker born every minute.
  428. 1.125  Random words
  429. paper factors difference votes behind chain treaties never group
  430. .761   Phrases with some random letters.
  431. Ignorance is bliss. spgemxk Education cures ignorance.
  432.  
  433. 5.0 Who might try to get my passphrase and how?
  434. ===============================================
  435.     Why would anyone want your passphrase? For almost all of us, no one
  436. is really interested in what we encrypt. The worst "enemy" we might normally
  437. face is a family member that is poking around where they don't belong or
  438. maybe the system administrator where your internet account is. Most family
  439. members these days probably wouldn't know where to begin attacking a
  440. passphrase and even 256 bit RSA would be safe from the computer illiterate
  441. crowd. For the really paranoid or fringes of society, the FBI or other major
  442. law enforcement agency might be looking. Everyone who knows what they are
  443. doing will try to get the passphrase without trying a brute force attack.
  444.  
  445. 5.1 Law enforcement and the government
  446. ======================================
  447.     If you are investigated by a law enforcement agency, then this is what
  448. you might get from the various sources. All your communications would be
  449. monitored. When they think they have enough information, the law
  450. enforcement agency will hand you a search warrant and they will go away
  451. with your computer and disks and probably a lot of other stuff as
  452. evidence. They will probably already have copies of plaintext traffic
  453. from and to you. While they are at it, they will probably take you in for
  454. questions. Once they have your computer, they will make copies and search
  455. the hard drive. If any or all of it is encrypted, they will try to
  456. decrypt it including any deleted files that might remain on the hard
  457. drive. If your passphrase is anywhere on the hard drive then they have
  458. the key to all of the files encrypted to you. Law enforcement has
  459. their own computer experts and can call in professionals as needed.
  460. Your individual experiences may vary depending on what country you are in.
  461.  
  462. 5.2 Multitasking systems
  463. ========================
  464.     You can't trust Windows 3.x, Windows 95, OS/2, and any other operating
  465. system that swaps memory to the hard drive or that uses virtual memory.
  466. For Mac users, the RAM disk may be saved to the hard drive automatically.
  467. Several windows users have found their passphrase in the swap file. It
  468. should be safe to run PGP in a DOS shell from Windows as long as Windows
  469. is inactive or in other words, no DOS windows. Windows programs that shell
  470. to DOS seem to directly write the passphrase into the swap file. There are
  471. several programs that will search the entire surface of a disk with little
  472. more than point and click. It is also pretty trivial to write a simple
  473. program that searches a file for text strings. More serious attacks and
  474. deleted files may require one of the many services that recover data from
  475. an unreadable disk. The main problem with multitasking systems is one of
  476. control. You simply can't effectively control what happens with the things
  477. in memory.
  478.  
  479. 5.3 Multi-user systems
  480. ======================
  481.     On the bigger multi-user systems, it is trivial for anyone with
  482. enough access to install snooping programs, make copies of files,
  483. and in some cases even directly monitor a user. You can also include
  484. networked PCs. On a network, you can control things remotely with
  485. the right software. Some network software may even come with programs
  486. that allow limited snooping. Using the computer at work could be
  487. handing your passphrase to a variety of people. Many people try to get
  488. around this problem by using a separate key on the multi-user system
  489. and a secure home key.
  490.  
  491. 5.4 Tempest and electronic surveillance
  492. ======================================
  493.     It is pretty well known that the electronic noise from computers
  494. can be monitored and even used. Every wire acts as an antenna radiating
  495. any signals that might be on it. The tricky part could be finding the
  496. one computer among several identical computers. If there is only one
  497. computer, then the spy job is pretty easy. In some cases, it is much
  498. easier to shield a room than to buy specially shielded equipment.
  499. The hardest part may be identifying the leaks and plugging them.
  500. Every wire into a room could carry a signal out of the room no matter
  501. how well the shielding is constructed. You would have to be pretty
  502. important to a major government or corporation before you need to worry
  503. about a tempest attack. Some tests with some really basic equipment
  504. showed that quite a bit of noise came from a monitor, very little noise
  505. was around a steel cased computer, and the keyboard allowed some noise.
  506. All cables used during the testing appeared to be shielded and the
  507. computer was idle with a variety of data shown on the screen.
  508. The detection equipment wasn't very sensitive so there may be more
  509. noise than was actually detected.
  510.  
  511. 6.0 How do I securely store my passphrase(s)?
  512. =============================================
  513.     The best way is probably a key splitting technique. You need to
  514. distribute pieces of a passphrase that protects all your regular
  515. passphrases. There is a number of ways to do this that will safeguard
  516. your keys even if you lose a few friends. A simple method would be to
  517. break up the key passphrase into 3 pieces. Then give the pieces to
  518. 6 different friends. To reconstruct your passphrase you need only 3
  519. of your friends and you have backups. Do the same thing with your
  520. actual passphrase file. The individual friends can't reconstruct your
  521. passphrase and they can't assemble the pieces unless all 3 of them
  522. cooperate. The security of this method improves if you use more people,
  523. but the most important part is having copies of your keys distributed in a
  524. way that you can recover them and no one else can. You should have at least
  525. one copy of PGP and your keys some place other than your house. Remember
  526. to limit your risks. See [1] for more on key splitting techniques and
  527. other references.
  528.  
  529. 6.1 Should I write my passphrase down?
  530. ======================================
  531.     I'll contradict myself now. For total security, you shouldn't write
  532. your passphrase down anywhere in any form, ever. Using the above key
  533. splitting technique isn't perfectly safe.
  534.     Writing your passphrase is a breach of security if care is not taken.
  535. Many ordinary disposal methods hand your written passphrase to anyone
  536. looking. A simple technique with an ordinary pencil will grab a passphrase
  537. from a pad of paper after the top sheet where the actual writing took place
  538. is removed. Throwing the copy of your passphrase in the trash gives your
  539. passphrase to the dumpster divers. Even trash from your house can be
  540. searched without much trouble. A wallet isn't a good place if you get
  541. hurt or your wallet gets stolen. There are many other problems with things
  542. that are written down.
  543.  
  544. 7.0 The really big numbers and other numbers
  545. ============================================
  546.     These are here to show how big these numbers really are. They are
  547. hard to work with and there is no good reason to use them other than to
  548. try and put things into scale. You need more than a pocket calculator
  549. to work with them in this form. Take note of the length of 2^128.
  550. This is the size of a 128 bit number. A 512 bit modulus is about 4
  551. times as long.
  552.  
  553. 1 million  =                                             1,000,000
  554. 1 billion  =                                         1,000,000,000
  555. 1 trillion =                                     1,000,000,000,000
  556. 3.15576E13 =                                    31,557,600,000,000
  557. 2^128      =   340,282,366,920,938,463,463,374,607,431,768,211,456
  558. 74,000^8   =   899,194,740,203,776,000,000,000,000,000,000,000,000
  559. 95^20      = 3,584,859,224,085,422,343,574,104,404,449,462,890,625
  560. 26^28      = 4,161,536,836,220,038,342,098,551,818,958,537,752,576
  561.  
  562.     These are the log(x) numbers used through out the FAQ. Mostly it is an
  563. attempt to make the math easier even if you don't understand what log(x) is.
  564.  
  565. log(2^128)    = 38.53183945
  566. log(3.16E13)  = 13.49910397
  567. log(74,000)   =  4.86923172
  568. log(50,000)   =  4.69897004
  569. log(25,000)   =  4.397940009
  570. log(10,000)   =  4.0
  571. log(95)       =  1.977723605
  572. log(26)       =  1.414973348
  573.  
  574. 7.1 Glossary
  575. ============
  576.     This is to clear up a few things in case the context isn't clear.
  577. More definitions will be added as needed.
  578.  
  579. brute force search = This is a search of the entire key space. Every possible
  580.     combination will be tried in sequence. Eg. Briefcase combination locks
  581.     have a key space of 1000 and will be searched (000, 001, 002... 999).
  582. key size = The actual size of the key. Eg. IDEA has a key size of 128 bits.
  583. key space = The number of possible combinations a key can have. Key space
  584.     is sometimes tricky to compute if there are methods of attack other than
  585.     trying every possible combination. Eg. IDEA has a key space of 2^128.
  586. psuedo-random = a mathematical sequence or other repeatable sequence that
  587.     appears to be random.
  588. random = A sequence that can not be reproduced by any means other than
  589.     replaying a recording of the sequence.
  590. search space = The size of the search needed to break a key. Sometimes keys
  591.     have a much smaller search space than the key size might dictate.
  592.     Eg. A 40 digit/130 bit hard number, (toy RSA), is bigger than the 39
  593.     digit key space of IDEA but can be factored in a few minutes or less
  594.     using one of the faster factoring methods.
  595.  
  596. 8.0 Copyrights and such
  597. =======================
  598.     Copyright 1995 by Randall T. Williams <ac387@yfn.ysu.edu>
  599.     This is free to distribute where it might be useful and not
  600.     for profit as long as this notice remains attached.
  601.  
  602. 9.0 References
  603. ==============
  604.     There are other books that could be included like statistics and books
  605. on calculating odds. I also may have missed a few references. I used [1] a
  606. lot in this document because of it's encyclopedic nature instead of
  607. including a long list of separate references.
  608.  
  609.     [1] Bruce Schneier, Applied Cryptography. John Wiley & Sons, 1994
  610.         (page numbers are for the 1st edition paperback)
  611.         [1a] p. 144-5 and p. 190-91
  612.         [1b] p. 141-3
  613.         [1c] p. 190 (attributed to Shannon)
  614.         [1d] p. 212
  615.         [1e] p. 347 Chapter 15
  616.     [2] The Random House Dictionary. Ballantine Books, 1980
  617.         (paperback, about 1.5 inches (3.8cm) thick
  618.         with "over 74,000 entries")
  619.     [3] Nick Stam, Inside the Chips. PC Magazine Feb. 21, 1995
  620.         p. 190-199
  621.     [4] Grady Ward, Creating Passphrases From Shocking Nonsense
  622.     [5] The Oxford Dictionary of Quotations. ???
  623.         ("over 40,000 quotations" from a sales add)
  624.     [6] RFC1750 Randomness Recommendations For Security
  625.         One source is: http://www.clark.net/pub/cme/html/ranno.html
  626.     [7] Randall T. Williams, A Simple Random Noise Source, July 01, 1995
  627.         Posted to sci.crypt and alt.security.pgp 9/95 and 10/95
  628.     [8] Arnold Reinhold, Diceware (A Passphrase generation system)
  629.         http://world.std.com/~reinhold/diceware.html
  630.  
  631.